/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * SobreLudi.java
 *
 * Created on 01/05/2011, 01:24:28
 */

package Interface;

/**
 *
 * @author fagner
 */
public class SobreLudi extends java.awt.Dialog {

    /** Creates new form SobreLudi */
    public SobreLudi(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();
        this.setLocationRelativeTo(parent);
        this.setVisible(true);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        labelLudi = new javax.swing.JLabel();
        scrollLicenca = new javax.swing.JScrollPane();
        textoLicenca = new javax.swing.JTextArea();
        botaoFechar = new javax.swing.JButton();
        labelVersao = new javax.swing.JLabel();

        setBackground(new java.awt.Color(249, 249, 249));
        setModalityType(java.awt.Dialog.ModalityType.APPLICATION_MODAL);
        setTitle("Sobre o LUDi");
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowClosing(java.awt.event.WindowEvent evt) {
                closeDialog(evt);
            }
        });

        labelLudi.setFont(new java.awt.Font("Ubuntu", 1, 36));
        labelLudi.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        labelLudi.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Interface/ludi.png"))); // NOI18N

        textoLicenca.setColumns(20);
        textoLicenca.setEditable(false);
        textoLicenca.setLineWrap(true);
        textoLicenca.setRows(5);
        textoLicenca.setText("LUDi é software livre; você pode redistribuí-lo e/ou modificá-lo sob os termos da Licença Pública Geral GNU (GNU General Public License), conforme publicada pela Free Software Foundation; tanto a versão 3 da Licença como (a seu critério) qualquer versão mais nova.");
        textoLicenca.setWrapStyleWord(true);
        scrollLicenca.setViewportView(textoLicenca);

        botaoFechar.setText("Fechar");
        botaoFechar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botaoFecharActionPerformed(evt);
            }
        });

        labelVersao.setFont(labelVersao.getFont().deriveFont(labelVersao.getFont().getStyle() | java.awt.Font.BOLD, 14));
        labelVersao.setText("V 1.0");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addComponent(labelLudi)
                        .addGap(62, 62, 62)
                        .addComponent(labelVersao))
                    .addComponent(scrollLicenca, javax.swing.GroupLayout.DEFAULT_SIZE, 394, Short.MAX_VALUE)
                    .addComponent(botaoFechar, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(labelVersao)
                    .addComponent(labelLudi))
                .addGap(18, 18, 18)
                .addComponent(scrollLicenca, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(botaoFechar)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /** Closes the dialog */
    private void closeDialog(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_closeDialog
        setVisible(false);
        dispose();
    }//GEN-LAST:event_closeDialog

    private void botaoFecharActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botaoFecharActionPerformed
        this.dispose();
}//GEN-LAST:event_botaoFecharActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton botaoFechar;
    private javax.swing.JLabel labelLudi;
    private javax.swing.JLabel labelVersao;
    private javax.swing.JScrollPane scrollLicenca;
    private javax.swing.JTextArea textoLicenca;
    // End of variables declaration//GEN-END:variables

}
